package com.example.api.mapper;


import com.example.api.model.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Optional;

@Mapper
public interface AdminMapper {
    Admin save(Admin admin);
    Admin findAdminByEmailAndPassword(@Param("email") String email, @Param("password") String password);
    Admin findAdminByEmail(@Param("email") String email);
    boolean existsAdminByRoles(@Param("roles") String roles);
    void insert(Admin admin); // 对应 JPA save
    Optional<Admin> findById(@Param("id") String id);
    void deleteById(@Param("id") String id);
    int update(Admin admin);
    List<Admin> findAll();
}

